package com.ekingstar.framework.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.opensymphony.xwork2.util.Element;


/**
 * AbstractRole entity provides the base persistence definition of the Role entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractRole  implements java.io.Serializable {


    // Fields    

     private String id;
     private String name;
     private String detail;
     private Date lastUpdateDate;
     private String updaterId;
     private Date addDate;
     private String adderId;
     private String deleterId;
     private Date deleteDate;
     
     @Element( value = Function.class )
     private List functions = new ArrayList();
     @Element( value = User.class )
     private List users = new ArrayList();
    

   

	/** default constructor */
    public AbstractRole() {
    }

	/** minimal constructor */
    public AbstractRole(String id) {
        this.id = id;
    }
    
   
   
    // Property accessors

    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }

    public String getDetail() {
        return this.detail;
    }
    
    public void setDetail(String detail) {
        this.detail = detail;
    }

    public Date getLastUpdateDate() {
        return this.lastUpdateDate;
    }
    
    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public String getUpdaterId() {
        return this.updaterId;
    }
    
    public void setUpdaterId(String updaterId) {
        this.updaterId = updaterId;
    }

    public Date getAddDate() {
        return this.addDate;
    }
    
    public void setAddDate(Date addDate) {
        this.addDate = addDate;
    }

    public String getAdderId() {
        return this.adderId;
    }
    
    public void setAdderId(String adderId) {
        this.adderId = adderId;
    }

    public String getDeleterId() {
        return this.deleterId;
    }
    
    public void setDeleterId(String deleterId) {
        this.deleterId = deleterId;
    }

    public Date getDeleteDate() {
        return this.deleteDate;
    }
    
    public void setDeleteDate(Date deleteDate) {
        this.deleteDate = deleteDate;
    }

	public List getFunctions() {
		return functions;
	}

	public void setFunctions(List functions) {
		this.functions = functions;
	}

	public List getUsers() {
		return users;
	}

	public void setUsers(List users) {
		this.users = users;
	}

  

	public boolean equals(Object other){
		if (! (other instanceof Role)) return false;
		Role o = (Role)other;
		if (this.id == null || o == null || o.getId() == null) return false;
		if (this.id.trim().equals(o.getId().trim()))return true;
		return false;
	}

  
   








}